package com.ssm.util.test;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.DecimalFormat;

public class shuzi {
	
	public static void test1() {
		String aa="152";
		String bb="2254";
		
		String format = new DecimalFormat("0.00").format(new BigDecimal(aa).divide(new BigDecimal(bb), 2, RoundingMode.HALF_UP));
		System.out.println(format);
	}
	
	public static void main(String[] args) throws Exception {
//		int i=0;
//		int j=0;
//		while (i<10) {
//			j=j*2+i;
//			i++;
//		}
//		System.out.println(j);
		shufor();
	}
	
	@SuppressWarnings("resource")
	public static void shufor() throws Exception {
		String str="";
		for (int i = 0; i < 1195488; i++) {
			str+="0";
		}
		
		File file = new File("D://shuzi.txt");
		FileOutputStream fos = new FileOutputStream(file);
		OutputStreamWriter osw = new OutputStreamWriter(fos, "UTF-8");
		osw.write(str);
		osw.flush();
		osw.close();
	}

}
